<%@ Page Title="" Language="C#" MasterPageFile="~/WebMaster.master" AutoEventWireup="True"
    CodeBehind="MeterDaily.aspx.cs" Inherits="meter_MeterDaily" Theme="DefaultSkin" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register src="../usercontrols/UserMeterCombo.ascx" tagname="UserMeterCombo" tagprefix="uc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:Panel ID="panelNoAcccess" runat="server" Visible="true">
        Please choose a meter that you have access to</asp:Panel>
    <asp:Panel runat="server" ID="panelValid" Visible="false" CssClass="infoblockcontent">
        <div style="float:left;width:540px">
            <h3><asp:Label ID="lblTotalInfo" runat="server" Text="Label"></asp:Label></h3>
            <p>Meter: <uc1:UserMeterCombo ID="userMeterCombo" runat="server" />(<asp:HyperLink ID="hypManageMeter" runat="server">Manage</asp:HyperLink>)</p>
        
            <p>Choose date: <asp:TextBox ID="txtElectricityDate" runat="server" CssClass="textBox"></asp:TextBox>
                <asp:CalendarExtender ID="txtElectricityDate_CalendarExtender" runat="server" Enabled="True"
                    TargetControlID="txtElectricityDate">
                </asp:CalendarExtender>
                <asp:Button runat="server" Text="Find" ID="btnFind" CssClass="buttonStyle"  OnClick="btnFind_Click"></asp:Button>
            </p>
        </div>
        
        <div style="float:right">
            <asp:Calendar ID="Calendar1" runat="server"
                Font-Size="8pt" ForeColor="black" BackColor="White" BorderWidth="0px" CellPadding="1" 
                DayNameFormat="Shortest" Font-Names="Verdana" Height="180px" Width="200px">
                <SelectedDayStyle BackColor="red" Font-Bold="True" ForeColor="white" />
                <SelectorStyle BackColor="red" ForeColor="white" />
                <WeekendDayStyle BackColor="#63ABDB" />
                <TodayDayStyle BackColor="#003056" ForeColor="White" />
                <OtherMonthDayStyle ForeColor="#888888" />
                <NextPrevStyle Font-Size="8pt" ForeColor="#CCCCFF" />
                <DayHeaderStyle BackColor="red" ForeColor="white" Height="1px" />
                <TitleStyle BackColor="#003056" BorderColor="#3366CC"
                    Font-Bold="True" Font-Size="8pt" ForeColor="white" Height="25px" />
            </asp:Calendar>
        </div>
        
        <div class="vsep"></div>
        
        <asp:Chart ID="chartDaily" runat="server">
            <Legends>
                <asp:Legend Name="Legend1" BackColor="Transparent" ForeColor="White"/>
            </Legends>
            <Titles>
                <asp:Title Name="Daily" Visible="True" Font="Verdana, 10pt, style=bold" ForeColor="White" />
            </Titles>
            <Series>
                <asp:Series ChartArea="ChartArea1" Name="Electricity" ChartType="StackedColumn" Legend="Legend1"
                    XValueMember="de_dateTime" YValueMembers="de_kWhDaily" ShadowOffset="3" Color="Red">
                </asp:Series>
            </Series>
            <ChartAreas>
                <asp:ChartArea Name="ChartArea1" BackColor="Transparent">
                    <AxisX LineColor="Orange" LabelAutoFitStyle="None" TitleForeColor="White" Title="Date">
                        <LabelStyle Enabled="true" ForeColor="White" Font="Verdana, 8pt" Angle="-30" Interval="2" Format="dd.MM"/>
                        <MajorGrid LineWidth="1" LineColor="#999999" />
                        <MajorTickMark Enabled="true" LineColor="Orange" />
                    </AxisX>
                    <AxisY LineColor="Orange" LabelAutoFitStyle="None" TitleForeColor="White" Title="kWh">
                        <LabelStyle Enabled="true" ForeColor="White" Font="Verdana, 8pt" />
                        <MajorGrid LineWidth="1" LineColor="#999999" />
                        <MajorTickMark Enabled="true" LineColor="Orange" />
                    </AxisY>
                </asp:ChartArea>
            </ChartAreas>
        </asp:Chart>
        <br />
        <asp:Chart ID="chartMonthly" runat="server">
            <Legends>
                <asp:Legend Name="Legend1" BackColor="Transparent" ForeColor="White"/>
            </Legends>
            <Titles>
                <asp:Title Name="Monthly" Visible="True" Font="Verdana, 10pt, style=bold" ForeColor="White" />
            </Titles>
            <Series>
                <asp:Series ChartArea="ChartArea1" Name="Electricity" ChartType="StackedColumn" Legend="Legend1"
                    XValueMember="Month" YValueMembers="TotalKWh" ShadowOffset="3" Color="Red">
                </asp:Series>
            </Series>
            <ChartAreas>
                <asp:ChartArea Name="ChartArea1" BackColor="Transparent">
                    <AxisX LineColor="Orange" LabelAutoFitStyle="None" TitleForeColor="White" Title="Month">
                        <LabelStyle Enabled="true" ForeColor="White" Font="Verdana, 8pt"/>
                        <MajorGrid LineWidth="1" LineColor="#999999" />
                        <MajorTickMark Enabled="true" LineColor="Orange" />
                    </AxisX>
                    <AxisY LineColor="Orange" LabelAutoFitStyle="None" TitleForeColor="White" Title="kWh">
                        <LabelStyle Enabled="true" ForeColor="White" Font="Verdana, 8pt" />
                        <MajorGrid LineWidth="1" LineColor="#999999" />
                        <MajorTickMark Enabled="true" LineColor="Orange" />
                    </AxisY>
                </asp:ChartArea>
            </ChartAreas>
        </asp:Chart>

        <p>Hint - click on either a bar in the month chart above, or the year chart below,
            to see more detail for that period.</p>
        
        <asp:Chart ID="chartAnnual" runat="server">
            <Legends>
                <asp:Legend Name="Legend1" BackColor="Transparent" ForeColor="White"/>
            </Legends>
            <Titles>
                <asp:Title Name="Annual" Visible="True" Font="Verdana, 10pt, style=bold" ForeColor="White" />
            </Titles>
            <Series>
                <asp:Series ChartArea="ChartArea1" ChartType="StackedColumn" Legend="Legend1" Name="Electricity"
                    XValueMember="Year" YValueMembers="TotalKWh" CustomProperties="DrawingStyle=Default"
                    ShadowOffset="3" Color="Red">
                </asp:Series>
            </Series>
            <ChartAreas>
                <asp:ChartArea Name="ChartArea1" BackColor="Transparent">
                    <AxisX LineColor="Orange" LabelAutoFitStyle="None" TitleForeColor="White" Title="Year">
                        <LabelStyle Enabled="true" ForeColor="White" Font="Verdana, 8pt" Angle="-30"/>
                        <MajorGrid LineWidth="1" LineColor="#999999" />
                        <MajorTickMark Enabled="true" LineColor="Orange" />
                    </AxisX>
                    <AxisY LineColor="Orange" LabelAutoFitStyle="None" TitleForeColor="White" Title="kWh">
                        <LabelStyle Enabled="true" ForeColor="White" Font="Verdana, 8pt" />
                        <MajorGrid LineWidth="1" LineColor="#999999" />
                        <MajorTickMark Enabled="true" LineColor="Orange" />
                    </AxisY>
                </asp:ChartArea>
            </ChartAreas>
        </asp:Chart>
    </asp:Panel>

    <asp:ScriptManager ID="ScriptManager1" runat="server" EnableScriptGlobalization="True"></asp:ScriptManager>

</asp:Content>
